<?php
Class SP_Helpers_Mailer
{
	public function simpleMail($subject,$body,$from,$to)
	{
		$subject = iconv('UTF-8','CP1251',$subject);
		$body = iconv('UTF-8','CP1251',$body);
		$from = iconv('UTF-8','CP1251',$from);
		$to = iconv('UTF-8','CP1251',$to);
		$headers  = "Content-type: text/html; charset=windows-1251 \r\n";
		$headers .=  "From: $from\r\n";
		if (mail($to, $subject, $body, $headers))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
}
?>